@include('home.public.header')
			<!-- HEADING-BANNER START -->
			<div class="heading-banner-area overlay-bg">
				<div class="container">
					<div class="row">
						<div class="col-md-12">
							<div class="heading-banner">
								<div class="heading-banner-title">
									<h2>核实信息</h2>
								</div>
								<div class="breadcumbs pb-15">
									<ul>
										<li><a href="/">首页</a></li>
										<li>核实信息</li>
									</ul>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- HEADING-BANNER END -->
			<!-- CHECKOUT-AREA START -->
			<div class="shopping-cart-area  pt-80 pb-80">
				<div class="container">	
					<div class="row">
						<div class="col-md-12 col-sm-12 col-xs-12">
							<div class="shopping-cart">
								<!-- Nav tabs -->
								<ul class="cart-page-menu row clearfix mb-30">
									<li><a href="/shopcart" data-toggle="">购物车</a></li>
									<li><a href="/wishlist" data-toggle="">心愿单</a></li>
									<li class="active"><a href="/checkout" data-toggle="">核实信息</a></li>
									<li><a href="/order" data-toggle="">订单</a></li>
								</ul>

								<!-- Tab panes -->
								<div class="tab-content">
									<!-- check-out start -->
									<div class="tab-pane active" id="check-out">
										<form action="/order/add" method="post">
											<div class="shop-cart-table check-out-wrap">
												<div class="row">
													<div class="col-md-6 col-sm-6 col-xs-12">
														<div class="billing-details pr-20">
															<h4 class="title-1 title-border text-uppercase mb-30">账单明细</h4>
															<input type="text" placeholder="姓名" value="{{$user->user_name}}">
															<input type="text" placeholder="手机号码" value="{{$user->user_tel}}">
															<select name="city_id" id="county" class="custom-select mb-15">
																<option value="">选择省份/直辖市</option>
																@foreach($county as $v)
																	<option value="{{$v->city_id}}">{{$v->city_name}}</option>
																@endforeach
															</select>
															<select name="city_id" id="city" class="custom-select mb-15">
																<option value="">选择城市</option>
															</select>
															<select name="city_id" id="town" class="custom-select mb-15">
																<option>选择乡镇</option>
															</select>
															<textarea class="custom-textarea" placeholder="详细住址" ></textarea>
														</div>
													</div>
													<div class="col-md-6 col-sm-6 col-xs-12 mt-xs-30">
														<div class="billing-details pl-20">
															<h4 class="title-1 title-border text-uppercase mb-30">收件人信息</h4>
															<input type="text" placeholder="收件人" name="consignee">
															<input type="text" placeholder="收件人手机" name="telphone">
															<select name="county" id="county1" class="custom-select mb-15">
																<option value="">省份/直辖市</option>
																@foreach($county as $v)
																	<option value="{{$v->city_id}}">{{$v->city_name}}</option>
																@endforeach
															</select>
															<select name="city" id="city1" class="custom-select mb-15">
																<option>选择城市</option>
															</select>
															<select name="town" id="town1" class="custom-select mb-15">
																<option>选择乡镇</option>
															</select>
															<textarea class="custom-textarea" placeholder="详细地址" name="area"></textarea>
														</div>
													</div>
													<div class="col-md-6 col-sm-6 col-xs-12">
														<div class="our-order payment-details mt-60 pr-20">
															<h4 class="title-1 title-border text-uppercase mb-30">订单</h4>
															<table>
																<thead>
																	<tr>
																		<th><strong>产品</strong></th>
																		<th class="text-right"><strong>总价</strong></th>
																	</tr>
																</thead>
																<tbody>
																	@foreach($shopcart as $v)
																		<tr>
																			<td class="text-left">{{$v->good_name}}</td>
																			<td class="text-right">${{$v->good_price1}}</td>
																		</tr>
																	@endforeach
																	<tr>
																		<td class="text-left">订单总价</td>
																		<td class="text-right">${{$total}}</td>
																		<input type="hidden" name="total" value="{{$total}}">
																	</tr>
																</tbody>
															</table>
														</div>
													</div>
													<!-- payment-method -->
													<div class="col-md-6 col-sm-6 col-sm-12 mt-xs-30">
														<div class="payment-method  pl-20">
															<h4 class="title-1 title-border text-uppercase mb-30">支付方式</h4>
															<div class="payment-accordion">
																<!-- Accordion start  -->
																<!-- <h3 class="payment-accordion-toggle active">直接付款</h3>
																<div class="payment-content default">
																	<p>直接付款</p>
																</div>  -->
																<!-- Accordion end -->
																<!-- Accordion start -->
																<!-- <h3 class="payment-accordion-toggle">货到付款</h3>
																<div class="payment-content">
																	<p>先检验商品，再付款。</p>
																</div> -->
																<select name="paymethod" id="county1" class="custom-select mb-15">
																	<option value="0">付款方式</option>
																	<option value="1">直接支付</option>
																	<option value="2">货到付款</option>
																</select>
																<!-- Accordion end -->
																<!-- Accordion end --> 
																<button class="button-one submit-button mt-15" data-text="place order" type="submit">确认下单</button>			
															</div>															
														</div>
													</div>
												</div>
											</div>
										</form>											
									</div>
									<!-- check-out end -->
								</div>

							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- CHECKOUT-AREA END -->
			@include("home.public.footer")
<script>
	//省市区
	$('#county').change(function(){
		var county_id=$(this).val();
		$.ajax({
			type:'post',
			url:'{{url("/checkout/city")}}',
			data:'county_id='+county_id,
			dataType:'html',
			success:function(z){
				console.log(z);
				$('#town').html('');
				$('#city').html(z);
			}
		})
	})
	$('#city').change(function(){
		var city_id=$(this).val();
		$.ajax({
			type:'post',
			url:'{{url("/checkout/town")}}',
			data:'city_id='+city_id,
			dataType:'html',
			success:function(z){
				console.log(z);
				$('#town').html(z);
			}
		})
	})

	//收件人地址
	$('#county1').change(function(){
		var county_id=$(this).val();
		$.ajax({
			type:'post',
			url:'{{url("/checkout/city")}}',
			data:'county_id='+county_id,
			dataType:'html',
			success:function(z){
				console.log(z);
				$('#town1').html('');
				$('#city1').html(z);
			}
		})
	})
	$('#city1').change(function(){
		var city_id=$(this).val();
		$.ajax({
			type:'post',
			url:'{{url("/checkout/town")}}',
			data:'city_id='+city_id,
			dataType:'html',
			success:function(z){
				console.log(z);
				$('#town1').html(z);
			}
		})
	})
</script>